****
* REPLICATION MATERIAL ARTICLE EMANUELE and TRASTULLI (PERSPECTIVES ON POLITICS 2024) 'Left governmental power and the reduction of inequalities in Western Europe (1871-2020)'
****

use "Emanuele and Trastulli PoP 2024.dta", replace

//MANUSCRIPT
//Figure 1
twoway (scatter left_gpi year, color(gs8) msize(vsmall) fcolor(white) graphregion(color(white))) (lfit left_gpi year, color(black)) (lowess left_gpi year, color(black) lpattern(dash)), xlabel(1880(20)2020) ytitle("GPI (Left)") ylabel(0(1)10) legend(lab(1 "GPI (Left)") lab(2 "Linear fit") lab(3 "Lowess"))

//Figure 2
twoway (scatter peqsocec year, color(none) msize(vsmall) msymbol(circle) fcolor(white) graphregion(color(white))) (scatter peqsocgr year, color(none) msize(vsmall) msymbol(square) fcolor(white) graphregion(color(white))) (scatter peqgen year, color(none) msize(vsmall) msymbol(triangle) fcolor(white) graphregion(color(white))) (scatter edueq year, color(none) msize(vsmall) msymbol(diamond) fcolor(white) graphregion(color(white))) (scatter heaeq year, color(none) msize(vsmall) msymbol(plus) fcolor(white) graphregion(color(white))) (lowess peqsocec year, color(black)) (lowess peqsocgr year, color(black) lpattern(dash)) (lowess peqgen year, color(black) lpattern(dash_3dot)) (lowess edueq year, color(gs8)) (lowess heaeq year, color(gs8) lpattern(dash)) , xlabel(1880(20)2020) legend(order (6  7  8  9 10 )) legend(lab(6 "Power equality by socioec pos") lab(7 "Power equality by soc group") lab(8 "Power equality by gender") lab(9 "Educational equality") lab(10 "Health equality")) legend(size(vsmall)) graphregion(color(white))
twoway (scatter welfuni year, color(none) msize(vsmall) fcolor(white) graphregion(color(white))) (lowess welfuni year, color(black)), ytitle("") xlabel(1880(20)2020) ylabel(0(1)5) legend(order (2)) legend(lab(2 "Welfare universalism")) legend(size(vsmall)) graphregion(color(white))
twoway (scatter gini year, color(none) msize(vsmall) fcolor(white) graphregion(color(white))) (lowess gini year, color(black)), ytitle("") xlabel (1880(20)2020) ylabel(0(0.1)0.6) legend(order (2)) legend(lab(2 "Gini index")) legend(size(vsmall)) graphregion(color(white))

//Table 2
xtpcse peqsocec left_gpi_01 lag_peqsocec i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqsocgr left_gpi_01 lag_peqsocgr i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqgen left_gpi_01 lag_peqgen i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse edueq left_gpi_01 lag_edueq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse heaeq left_gpi_01 lag_heaeq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse welfuni left_gpi_01 lag_welfuni i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse gini left_gpi_01 lag_gini i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly

//Figure 3 Coefplot
eststo reg1: xtpcse st_peqsocec left_gpi_011 lag_peqsocec year  disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm  i.cntry if excl!=1,  hetonly
eststo reg2: xtpcse st_peqsocgr left_gpi_012 lag_peqsocgr year  disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1,  hetonly
eststo reg3: xtpcse st_peqgen left_gpi_013 lag_peqgen year  disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm  i.cntry if excl!=1,  hetonly
eststo reg4: xtpcse st_edueq left_gpi_014 lag_edueq year  disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1,  hetonly
eststo reg5: xtpcse st_heaeq left_gpi_015 lag_heaeq year  disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm  i.cntry if excl!=1,  hetonly
eststo reg6: xtpcse st_welfuni left_gpi_016 lag_welfuni year  disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1,  hetonly
eststo reg7: xtpcse st_inverted_gini left_gpi_017 lag_gini year  disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1,  hetonly

coefplot (reg1, mcolor(black) ciopts(lcolor(black)))(reg2, mcolor(black) ciopts(lcolor(black))) (reg3, mcolor(black) ciopts(lcolor(black))) (reg4, mcolor(black) ciopts(lcolor(black))) (reg5, mcolor(black) ciopts(lcolor(black))) (reg6, mcolor(black) ciopts(lcolor(black))) (reg7, mcolor(black) ciopts(lcolor(black))),  drop(_cons) keep(left_gpi_011 left_gpi_012 left_gpi_013 left_gpi_014 left_gpi_015 left_gpi_016 left_gpi_017) legend(off) title("Effect of GPI(Left) on different measures of equality", size(medium) color(black)) graphregion(color(white) lcolor(black)) grid(none) coeflabels(left_gpi_011="Power equality by socioec pos" left_gpi_012="Power equality by social group" left_gpi_013="Power equality by gender" left_gpi_014="Educational equality" left_gpi_015="Health equality" left_gpi_016="Welfare universalism" left_gpi_017="Income equality")  offset(0) xline(0, lcolor(gs6) lpattern(dash))

//Figure 4 (and Table A18) 
eststo regint1: xtpcse st_peqsocec c.left_gpi_01##c.year lag_peqsocec disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1,  hetonly
margins, dydx (left_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Socioec. pos.", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("") 

graph save marg1.gph, replace

eststo regint2: xtpcse st_peqsocgr c.left_gpi_01##c.year lag_peqsocgr disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1 ,  hetonly
margins, dydx (left_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Social group", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("")

graph save marg2.gph, replace

eststo regint3: xtpcse st_peqgen c.left_gpi_01##c.year lag_peqgen disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1,  hetonly
margins, dydx (left_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Gender", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("") 

graph save marg3.gph, replace

eststo regint4: xtpcse st_edueq c.left_gpi_01##c.year lag_edueq disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1,  hetonly
margins, dydx (left_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Educ. equality", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("")

graph save marg4.gph, replace

eststo regint5: xtpcse st_heaeq c.left_gpi_01##c.year lag_heaeq disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1 ,  hetonly
margins, dydx (left_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Health equality", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("")

graph save marg5.gph, replace

eststo regint6: xtpcse st_welfuni c.left_gpi_01##c.year lag_welfuni disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1 ,  hetonly
margins, dydx (left_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Welfare universalism", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("")

graph save marg6.gph, replace

eststo regint7: xtpcse st_inverted_gini c.left_gpi_01##c.year lag_inverted_gini  disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1 ,  hetonly
margins, dydx (left_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Income equality", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(,labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("")

graph save marg7.gph, replace

graph combine "marg1" "marg2" "marg3" "marg4" "marg5" "marg6" "marg7", graphregion(color(white))



//APPENDIX

//Figure A1
hist left_gpi, freq horizontal fcolor(black) graphregion(color(white)) ylabel(0 (1) 10)

//Figure A2
graph bar mean_left_gpi, over(country_short) ytitle("Mean GPI (Left)") bar(1, color(cranberry))

//Figure A3
twoway (scatter left_gpi year, color(orange red) msize(small)) (lfit left_gpi year, color(cranberry)) (lowess left_gpi year, color(cranberry) lpattern(dash)), xlabel(1880(40)2020) ytitle("GPI (Left)") ylabel(0(1)10) legend(lab(1 "GPI (Left)") lab(2 "Linear fit") lab(3 "Lowess")) by(country)

//Reported correlations with alternative measures of the DVs
pwcorr peqsocgr minority_mps if excl!=1, sig star(.05) obs
pwcorr peqgen fem_mps if excl!=1, sig star(.005) obs
pwcorr edueq edu15plus if excl!=1, sig star(.05) obs
pwcorr edueq edu1564 if excl!=1, sig star(.05) obs
pwcorr welfuni scip_popavg if excl!=1, sig star(.05) obs

//Figures A4-A10
twoway (scatter peqsocec year, color(black) msize(vsmall)) (lfit peqsocec year, color(black)) (lowess peqsocec year, color(black) lpattern(dash)), xlabel(1880(40)2020) ytitle("Power equality by socioec pos") ylabel(0(1)4) legend(lab(1 "Power equality by socioec pos") lab(2 "Linear fit") lab(3 "Lowess")) by(country)
twoway (scatter peqsocgr year, color(black) msize(vsmall)) (lfit peqsocgr year, color(black)) (lowess peqsocgr year, color(black) lpattern(dash)), xlabel(1880(40)2020) ytitle("Power equality by social group") ylabel(0(1)4) legend(lab(1 "Power equality by social group") lab(2 "Linear fit") lab(3 "Lowess")) by(country)
twoway (scatter peqgen year, color(black) msize(vsmall)) (lfit peqgen year, color(black)) (lowess peqgen year, color(black) lpattern(dash)), xlabel(1880(40)2020) ytitle("Power equality by gender") ylabel(0(1)4) legend(lab(1 "Power equality by gender") lab(2 "Linear fit") lab(3 "Lowess")) by(country)
twoway (scatter edueq year, color(black) msize(vsmall)) (lfit edueq year, color(black)) (lowess edueq year, color(black) lpattern(dash)), xlabel(1900(40)2020) ytitle("Educational equality") ylabel(0(1)4)  legend(lab(1 "Educational equality") lab(2 "Linear fit") lab(3 "Lowess")) by(country)
twoway (scatter heaeq year, color(black) msize(vsmall)) (lfit heaeq year, color(black)) (lowess heaeq year, color(black) lpattern(dash)), xlabel(1900(40)2020) ytitle("Health equality")  ylabel(0(1)4) legend(lab(1 "Health equality") lab(2 "Linear fit") lab(3 "Lowess")) by(country)
twoway (scatter welfuni year, color(black) msize(vsmall)) (lfit welfuni year, color(black)) (lowess welfuni year, color(black) lpattern(dash)), xlabel(1900(40)2020) ytitle("Welfare universalism") ylabel(0(1)5) legend(lab(1 "Welfare universalism") lab(2 "Linear fit") lab(3 "Lowess")) by(country)
twoway (scatter gini year, color(black) msize(vsmall)) (lfit gini year, color(black)) (lowess gini year, color(black) lpattern(dash)), xlabel(1880(40)2020) ytitle("Gini index") ylabel(0(0.1)0.6) legend(lab(1 "Gini index") lab(2 "Linear fit") lab(3 "Lowess")) by(country)

//Table A3
eststo clear
eststo: xtpcse peqsocec left_gpi_01 lag_peqsocec i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
eststo: xtpcse peqsocgr left_gpi_01 lag_peqsocgr i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
eststo: xtpcse peqgen left_gpi_01 lag_peqgen i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
eststo: xtpcse edueq left_gpi_01 lag_edueq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
eststo: xtpcse heaeq left_gpi_01 lag_heaeq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
eststo: xtpcse welfuni left_gpi_01 lag_welfuni i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
eststo: xtpcse gini left_gpi_01 lag_gini i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly

sum peqsocec left_gpi_01 lag_peqsocec ecoshocks perwar polcorr client disprop suffr euconstr rigadm  year if _est_est1==1
sum peqsocgr if _est_est2==1
sum peqgen if _est_est3==1
sum edueq if _est_est4==1
sum heaeq if _est_est5==1
sum welfuni if _est_est6==1
sum gini if _est_est7==1

//Table A4
xtpcse peqsocec left_gpi_01 lag_peqsocec  i.cntry if excl!=1,  hetonly
xtpcse peqsocgr left_gpi_01 lag_peqsocgr i.cntry if excl!=1,  hetonly
xtpcse peqgen left_gpi_01 lag_peqgen i.cntry if excl!=1,  hetonly
xtpcse edueq left_gpi_01 lag_edueq i.cntry if excl!=1,  hetonly
xtpcse heaeq left_gpi_01 lag_heaeq i.cntry if excl!=1,  hetonly
xtpcse welfuni left_gpi_01 lag_welfuni i.cntry if excl!=1,  hetonly
xtpcse gini left_gpi_01 lag_gini i.cntry if excl!=1,  hetonly

//Table A5
xtpcse peqsocec left_gpi_01 lag_peqsocec  i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & peqsocec_nr > 2,  hetonly
xtpcse peqsocgr left_gpi_01 lag_peqsocgr i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & peqsocgr_nr > 2,  hetonly
xtpcse peqgen left_gpi_01 lag_peqgen i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & peqgen_nr > 2,  hetonly
xtpcse edueq left_gpi_01 lag_edueq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & edueq_nr > 2,  hetonly
xtpcse heaeq left_gpi_01 lag_heaeq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & heaeq_nr > 2,  hetonly
xtpcse welfuni left_gpi_01 lag_welfuni i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & welfuni_nr > 2,  hetonly

//Table A7
xtpcse peqsocec newleft_gpi_01 lag_peqsocec  i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqsocgr newleft_gpi_01 lag_peqsocgr i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqgen newleft_gpi_01 lag_peqgen i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse edueq newleft_gpi_01 lag_edueq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse heaeq newleft_gpi_01 lag_heaeq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse welfuni newleft_gpi_01 lag_welfuni i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse gini newleft_gpi_01 lag_gini i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly

//Table A8
xtpcse peqsocec mainleft_gpi_01 lag_peqsocec  i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqsocgr mainleft_gpi_01 lag_peqsocgr i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqgen mainleft_gpi_01 lag_peqgen i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse edueq mainleft_gpi_01 lag_edueq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse heaeq mainleft_gpi_01 lag_heaeq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse welfuni mainleft_gpi_01 lag_welfuni i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse gini mainleft_gpi_01 lag_gini i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly

//Table A9
xtpcse peqsocec mainsd_gpi_01 lag_peqsocec  i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqsocgr mainsd_gpi_01 lag_peqsocgr i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqgen mainsd_gpi_01 lag_peqgen i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse edueq mainsd_gpi_01 lag_edueq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse heaeq mainsd_gpi_01 lag_heaeq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse welfuni mainsd_gpi_01 lag_welfuni i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse gini mainsd_gpi_01 lag_gini i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly

//Table A10
xtpcse peqsocec left_gpi_01 lag_peqsocec  i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & year > 1905,  hetonly
xtpcse peqsocgr left_gpi_01 lag_peqsocgr i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & year > 1905,  hetonly
xtpcse peqgen left_gpi_01 lag_peqgen i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & year > 1905,  hetonly
xtpcse edueq left_gpi_01 lag_edueq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & year > 1905,  hetonly
xtpcse heaeq left_gpi_01 lag_heaeq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & year > 1905,  hetonly
xtpcse welfuni left_gpi_01 lag_welfuni i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & year > 1905,  hetonly
xtpcse gini left_gpi_01 lag_gini i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & year > 1905,  hetonly

//Table A11
xtpcse peqsocec left_gpi_01 lag_peqsocec  i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & dem_polv==1,  hetonly
xtpcse peqsocgr left_gpi_01 lag_peqsocgr i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & dem_polv==1,  hetonly
xtpcse peqgen left_gpi_01 lag_peqgen i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & dem_polv==1,  hetonly
xtpcse edueq left_gpi_01 lag_edueq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & dem_polv==1,  hetonly
xtpcse heaeq left_gpi_01 lag_heaeq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & dem_polv==1,  hetonly
xtpcse welfuni left_gpi_01 lag_welfuni i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & dem_polv==1,  hetonly
xtpcse gini left_gpi_01 lag_gini i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1 & dem_polv==1,  hetonly

//Table A12
xtpcse peqsocec left_cabseat_share lag_peqsocec  i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqsocgr left_cabseat_share lag_peqsocgr i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqgen left_cabseat_share lag_peqgen i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse edueq left_cabseat_share lag_edueq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse heaeq left_cabseat_share lag_heaeq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse welfuni left_cabseat_share lag_welfuni i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse gini left_cabseat_share lag_gini i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly

//Table A13
xtpcse peqsocec left_gpi_01 lag_peqsocec i.ecoshocks2 i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqsocgr left_gpi_01 lag_peqsocgr i.ecoshocks2 i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqgen left_gpi_01 lag_peqgen i.ecoshocks2 i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse edueq left_gpi_01 lag_edueq i.ecoshocks2 i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse heaeq left_gpi_01 lag_heaeq i.ecoshocks2 i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse welfuni left_gpi_01 lag_welfuni i.ecoshocks2 i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse gini left_gpi_01 lag_gini i.ecoshocks2 i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly

//Table A14
xtpcse peqsocec left_gpi_01 lag_peqsocec i.ecoshocks i.perwar2 polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqsocgr left_gpi_01 lag_peqsocgr i.ecoshocks i.perwar2 polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqgen left_gpi_01 lag_peqgen i.ecoshocks i.perwar2 polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse edueq left_gpi_01 lag_edueq i.ecoshocks i.perwar2 polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse heaeq left_gpi_01 lag_heaeq i.ecoshocks i.perwar2 polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse welfuni left_gpi_01 lag_welfuni i.ecoshocks i.perwar2 polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse gini left_gpi_01 lag_gini i.ecoshocks i.perwar2 polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly

//Table A15
xtpcse peqsocec left_gpi_01 lag_peqsocec i.ecoshocks i.perwar polcorr client el_syst i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqsocgr left_gpi_01 lag_peqsocgr i.ecoshocks i.perwar polcorr client el_syst i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqgen left_gpi_01 lag_peqgen i.ecoshocks i.perwar polcorr client el_syst i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse edueq left_gpi_01 lag_edueq i.ecoshocks i.perwar polcorr client el_syst i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse heaeq left_gpi_01 lag_heaeq i.ecoshocks i.perwar polcorr client el_syst i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse welfuni left_gpi_01 lag_welfuni i.ecoshocks i.perwar polcorr client el_syst i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse gini left_gpi_01 lag_gini i.ecoshocks i.perwar polcorr client el_syst i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly

//Table A16
xtpcse peqsocec left_gpi_01 lag_peqsocec ud i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqsocgr left_gpi_01 lag_peqsocgr ud i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqgen left_gpi_01 lag_peqgen ud i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse edueq left_gpi_01 lag_edueq ud i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse heaeq left_gpi_01 lag_heaeq ud i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse welfuni left_gpi_01 lag_welfuni ud i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse gini left_gpi_01 lag_gini ud i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly

//Table A17
xtpcse peqsocec cr_gpi_01 lag_peqsocec i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year  i.cntry if excl!=1,  hetonly
xtpcse peqsocgr cr_gpi_01 lag_peqsocgr i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse peqgen cr_gpi_01 lag_peqgen i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year  i.cntry if excl!=1,  hetonly
xtpcse edueq cr_gpi_01 lag_edueq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse heaeq cr_gpi_01 lag_heaeq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year  i.cntry if excl!=1,  hetonly
xtpcse welfuni cr_gpi_01 lag_welfuni i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly
xtpcse gini cr_gpi_01 lag_gini i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm  year i.cntry if excl!=1,  hetonly

//Figure A11
eststo regint1: xtpcse st_peqsocec c.newleft_gpi_01##c.year lag_peqsocec  disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1,  hetonly
margins, dydx (newleft_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Socioec. pos.", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("") 

graph save marg1.gph, replace

eststo regint2: xtpcse st_peqsocgr c.newleft_gpi_01##c.year lag_peqsocgr disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1 ,  hetonly
margins, dydx (newleft_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Social group", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("")

graph save marg2.gph, replace

eststo regint3: xtpcse st_peqgen c.newleft_gpi_01##c.year lag_peqgen disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1,  hetonly
margins, dydx (newleft_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Gender", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("") 

graph save marg3.gph, replace

eststo regint4: xtpcse st_edueq c.newleft_gpi_01##c.year lag_edueq disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1,  hetonly
margins, dydx (newleft_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Educ. equality", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("")

graph save marg4.gph, replace

eststo regint5: xtpcse st_heaeq c.newleft_gpi_01##c.year lag_heaeq disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1 ,  hetonly
margins, dydx (newleft_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Health equality", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("")

graph save marg5.gph, replace

eststo regint6: xtpcse st_welfuni c.newleft_gpi_01##c.year lag_welfuni disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1 ,  hetonly
margins, dydx (newleft_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Welfare universalism", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(-0.2(0.2) 0.4, labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("")

graph save marg6.gph, replace

eststo regint7: xtpcse st_inverted_gini c.newleft_gpi_01##c.year lag_inverted_gini disprop polcorr  i.perwar i.ecoshocks i.suffr i.euconstr client rigadm i.cntry if excl!=1 ,  hetonly
margins, dydx (newleft_gpi_01) at (year= (1900 (10) 2020)) vsquish
marginsplot, recast(line) plotopts(lcolor(black)) recastci(rcap) graphregion(color(white)) ciopts(lcolor(black)) ytitle("Marginal effect of GPI on Income equality", size(vsmall)) xtitle("Year", size(vsmall)) ylabel(,labsize(vsmall)) xlabel(1900(20) 2020, alternate labsize(vsmall)) title("")

graph save marg7.gph, replace

graph combine "marg1" "marg2" "marg3" "marg4" "marg5" "marg6" "marg7", graphregion(color(white))


//Table A19
xtpcse peqsocec c.cr_gpi_01##c.year lag_peqsocec  i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm i.cntry if excl!=1,  hetonly
xtpcse peqsocgr c.cr_gpi_01##c.year lag_peqsocgr i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm i.cntry if excl!=1 ,  hetonly
xtpcse st_peqgen c.cr_gpi_01##c.year lag_peqgen i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm i.cntry if excl!=1,  hetonly
xtpcse edueq c.cr_gpi_01##c.year lag_edueq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm i.cntry if excl!=1,  hetonly
xtpcse heaeq c.cr_gpi_01##c.year lag_heaeq i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm i.cntry if excl!=1 ,  hetonly
xtpcse welfuni c.cr_gpi_01##c.year lag_welfuni i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm i.cntry if excl!=1 ,  hetonly
xtpcse st_inverted_gini c.cr_gpi_01##c.year lag_inverted_gini i.ecoshocks i.perwar polcorr client disprop i.suffr i.euconstr rigadm i.cntry if excl!=1,  hetonly







 